The present invention relates generally to Information Management System (IMS) databases in data processing systems. (IMS is a trademark of International Business Machines Corporation in the United States, other countries, or both.) More specifically, the present invention relates to a method and apparatus to assist database administrators in managing IMS databases requiring various management tasks such as replication, backup, restore, mass update, mass insert or merge operations.
IMS is a hierarchical database management system (HDBMS) developed by International Business Machines Corporation. IMS has wide spread usage in many large enterprises where high transaction volume, reliability, availability and seal ability are of the utmost importance. IMS provides base software and interfaces for running the businesses of many of the world""s large corporations. However, companies incorporating IMS databases into their business models typically makes significant investments in IMS application programs in order to have IMS perform meaningful data processing work particularly tailored to the needs of their respective enterprises. IMS application programs are typically coded in COBOL, PL/I, C, PASCAL or assembly language. These application programs perform IMS database functions by making Data Language One (DL/I) calls to invoke the needed IMS processing.
Sometimes an application program is custom developed by a company for its exclusive use on a particular IMS system. However, there is a different class of application program known in the art as a tool, utility, or utility program (henceforth referred to as utility). These utilities are frequently developed by a software provider to perform tasks that are common in many IMS installations, thereby saving a significant amount of work otherwise expended in developing custom applications to perform very common tasks. For example, unloading and reloading IMS databases for the purposes of backup/recovery or database reorganization are very common tasks for which numerous unload/reload utilities are currently available.
The use of these utilities may save significant time when compared to the laborious process of developing comparable custom application programs. However, the unload/reload utilities, briefly discussed above and currently known in the art, have a significant limitation which renders these utilities unusable for many common database administration tasks. More specifically, this limitation mandates that the target database of a reload operation utilizing an unload file must not be populated (or, alternatively, must be empty) prior to initiating the reload operation. This significant limitation renders numerous database management tasks inappropriate for a unload/reload utility and thereby forces an enterprise to embark on expensive and time consuming custom database application programming endeavors to accomplish these database management tasks.
For example, merging two separate databases of similar structure into a single database cannot currently be accomplished by utilizing unload/reload since this operation necessarily requires a load into a populated database. Additional examples include mass update operations where an unload file contains replacement database records for corresponding records in an existing database; or, a mass insert operation where an unload file contains additional database records to be added to an existing database. In all of the above examples prior art unload/reload utilities cannot be deployed because the target database is populated, resulting in the loss of performance and efficiency advantages normally associated with the use of simple unload/reload utilities.
Accordingly, there is a need for an IMS unload/reload utility that can be used to accomplish a variety of database management tasks, including mass insert, mass update, database replication, database merge, database consolidation, database recovery and the like. It is highly desirable to enhance programmer productivity in the accomplishments of these tasks, as well as improve the processing efficiency of the computing system on which they are performed.
To overcome the limitations in the prior art briefly described above, the present invention provides a method, computer program product, and system for performing content reactive reload utility operations on populated IMS databases. More specifically, a content reactive reload utility receives one or more content reactive user directives that may influence processing depending upon the content of a populated target database. Records are then read from an unload file and the IMS segments contained therein are written to the target database. If an IMS segment receives a duplicate error in performing, or attempting to perform, the write operation (because the segment already exists in the target database), then processing continues in accordance with the previously received user directives. The content reactive user directive may indicate that processing should be terminated, that processing should continue with the next segment from the unload file or that the duplicate segment from the unload file should replace the like segment in the target database. In this manner, an unload file can be applied to a populated IMS database to achieve many common database management tasks with enhanced programmer productivity and improved processing efficiency.
Various advantages and features of novelty, which characterize the present invention, are pointed out with particularity in the claims annexed hereto and form a part hereof. However, for a better understanding of the invention and its advantages, reference should be made to the accompanying descriptive matter, together with the corresponding drawings which form a further part hereof, in which there is described and illustrated specific examples of preferred embodiments in accordance with the present invention.